<?php
/**
 * Created by PhpStorm.
 * User: hui
 * Date: 16/8/22
 * Time: 11:01
 */

namespace app\index\controller;


use app\index\model\Personnel;
use think\Controller;
use think\Db;
use think\Request;

class Admin extends Controller
{
    protected static $auth;

    public function view()
    {
        if ($data = Request::instance()->post()){
            return $this->check_auth($data);
        }
        return $this->fetch('Admin/index');
    }

    protected function auth()
    {

    }

    protected function check_auth($data){
        if (!captcha_check($data['captcha'],$data['id'])){
            return ['status' => 4]; //验证码错误返回4
        }
        $personnel = new Personnel;
    }
}